﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DB_NH.DB_Map.Finance
{
    using NHibernate;
    using NHibernate.Mapping.ByCode;
    using NHibernate.Mapping.ByCode.Conformist;

    using DB_NH.DB_Model.Finance;

    public class map_BZJReceiptForProject : EntityMapping<BZJReceiptForProject>
    {
        public map_BZJReceiptForProject()
        {
            Property(x => x.BaoHanHao, map =>
            {
                map.Length(100);
            });

            Property(x => x.BiZhong, map =>
            {
                map.Length(20);
            });

            Property(x => x.DaYinLiShi, map =>
            {
                map.Length(500000000);
            });

            Property(x => x.JinEDaXie, map =>
            {
                map.Length(100);
            });

            Property(x => x.JinEXiaoXie, map =>
            {
                map.Length(50);
            });

            Property(x => x.LeiBie, map =>
            {
                map.Length(50);
            });

            //对应的投标人
            ManyToOne(x => x.Enterprise, map =>
            {
                map.Column("EntId");
            });

            //对应的项目
            ManyToOne(x => x.Project, map =>
            {
                map.Column("ProjectId");
            });

            //操作员
            ManyToOne(x => x.OpUser, map =>
            {
                map.Column("UserId");
            });
        }
    }
}
